<?php

namespace app\api\controller;

use support\Request;

class PageContentController
{
    public function getStaticContentListByPositionId(Request $request)
    {
        $positionId = $request->post('position_id');

        try {
            $pageContentService = new \app\services\PageContentService();
            $contents = $pageContentService->getStaticContentListByPositionId($positionId);

            return ok_rsp('成功', $contents);
        } catch (\Exception $e) {
            return err_rsp($e->getMessage());
        }
    }

}